<extend name="Public:layout"/>
<block name="seo">
    <title>{$info.title|default=$website_info['seo_title']}</title>
    <meta name="keywords" content="{$info.keyword|default=$website_info['seo_keywords']}">
    <meta name="description" content="{$info.description|default=$website_info['seo_description']}">
</block>
<block name="css">
    <link rel="shortcut icon" href="__STATIC__/mobile/images/logo-icon.ico"/>
    <link rel="stylesheet" href="__STATIC__/mobile/dist/css/mzui.css?v=__STATIC_VERSION__"/>
    <link rel="stylesheet" href="__STATIC__/mobile/css/video-detail.css?v=__STATIC_VERSION__"/>
</block>
<block name="js_header">
    <script src="__STATIC__/mobile/js/setRem.js?v=__STATIC_VERSION__"></script>
</block>
<block name="headersite"></block>
<block name="content">
    <div id="header" class="affix dock-top flex space-between align-middle">
        <button class="text-white clean borderless flex align-middle"><i></i> 返回</button>
        <div class="flex align-middle">
            <a class="toIndex flex" href="/"><span></span></a>
            <a class="share flex" href="#"><span id="showSharePanel"></span></a>
        </div>
    </div>
    <!--新闻标题-->
    <h1>{$info.title}</h1>

    <div class="view flex space-between">
        <time>{$info.create_time|date='Y-m-d', ###}</time>
        <!--<p class="flex align-middle"><i></i><span>{$info.click}</span></p>-->
    </div>
    <!--新闻内容-->
    <section id="main">
        <div id="article-content">{$info.content|htmlspecialchars_decode}</div>
        <notempty name="info.video_id">
        <div class="videoDetialVideoBox">
            <iframe width="100%" height="100%" src="http://player.youku.com/embed/{$info.video_id}" isAutoPlay="true" showAd="0" frameborder=0 allowfullscreen></iframe>
            <!--<embed src="http://static.youku.com/v/swf/qplayer.swf?VideoIDS={$info.video_id}&isAutoPlay=true&showAd=0" allowFullScreen="true" quality="high" width="480" height="400" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>-->
        </div>
        </notempty>

    </section>
    <!--上一篇、下一篇-->
    <div class="more flex flex-column">
        <notempty name="up">
            <a href="{:U('News/detail', array('id'=>$up['article_id'], 'cat'=>I('cat')))}" class="prev">
                <span class="prevMark">上一篇：</span>
                <span class="text">{$up.title}</span>
            </a>
        </notempty>
        <notempty name="down">
            <a href="{:U('News/detail', array('id'=>$down['article_id'], 'cat'=>I('cat')))}" class="next">
                <span class="prevMark">下一篇：</span>
                <span class="text">{$down.title}</span>
            </a>
        </notempty>
    </div>
    <!--文章说明开始-->
    <div class="articleExplain flex flex-column">
        <a href="javascript:void(0);" class="statementSource">
            <span >来源：</span>
            <span >{$info.source}</span>
        </a>
        <a href="{$info['website'] ? $info['website'] : '#'}" class="statementSourceLink">
            <span >链接：</span>
            <span >{$info.website}</span>
        </a>
    </div>
    <!--文章说明结束-->
    <div  id="toTop" class="flex justify-end align-middle">
        <a href="#">返回顶部 <i></i></a>
    </div>
    <div id="showShareMask"></div>
    <div id="sharePanel" class="bdsharebuttonbox">
        <ul class="shareIconTextContent flex space-between flex-nowrap ">
            <li>
                <a href="javascript:;" class="shareIconText wechat nativeShare" data-app="weixin">
                    <span class="weixinIcon"></span>
                    <strong>微信</strong>
                </a>
            </li>
            <li>
                <a href="javascript:;" class="shareIconText wechat-share nativeShare" data-app="weixinFriend">
                    <span class="CircleOfFriendsIcon"></span>
                    <strong>朋友圈</strong>
                </a>
            </li>
            <li>
                <a href="javascript:;" class="shareIconText tQQ nativeShare" data-app="QQ">
                    <span class="QQIcon"></span>
                    <strong>QQ</strong>
                </a>
            </li>
            <li>
                <a href="javascript:;" class="shareIconText qZone nativeShare" data-app="QZone">
                    <span class="qzoneIcon"></span>
                    <strong>QQ空间</strong>
                </a>
            </li>
            <li>
                <a href="javascript:;" class="shareIconText sinaWeibo nativeShare" data-app="sinaWeibo">
                    <span class="microblogIcon"></span>
                    <strong>微博</strong>
                </a>
            </li>
        </ul>
        <div class="closeShare">
            <div class="closeShareBtn" >取消</div>
        </div>
    </div>

</block>
<block name="js_footer">
    <script src="__STATIC__/mobile/js/jquery-3.2.1.js?v=__STATIC_VERSION__"></script>
    <script src="__STATIC__/mobile/dist/js/mzui.js?v=__STATIC_VERSION__"></script>
    <script src="__STATIC__/mobile/js/public.js?v=__STATIC_VERSION__"></script>
    <script src="__STATIC__/mobile/js/detail.js?v=__STATIC_VERSION__"></script>
    <script src="__STATIC__/plugin/share.js?v=__STATIC_VERSION__"></script>
    <script src="__STATIC__/plugin/mobileShare.js?v=__STATIC_VERSION__"></script>
    <script>
        var config = {
            url: location.href, //分享url
            title: $('title').text(), //内容标题
            desc: '', //描述
            img: '', //分享的图片
            img_title: '', //图片名称
            from: '' //来源
        };
        var share_obj = new nativeShare('nativeShare', config);
        if(!share_obj.isUseful) {
            $(".tQQ").on("click",function(){
                var p = {
                    url : location.href, /*获取URL，可加上来自分享到QQ标识，方便统计*/
                    desc:'',
                    //title : '新玩法，再不来你就out了！', /*分享标题(可选)*/
                    title:$('title').text(),
                    summary : '', /*分享摘要(可选)*/
                    pics : '', /*分享图片(可选)*/
                    flash : '', /*视频地址(可选)*/
                    site : location.href, /*分享来源(可选) 如：QQ分享*/
                    style : '201',
                    width : 32,
                    height : 32
                };
                var s = [];
                for ( var i in p) {
                    s.push(i + '=' + encodeURIComponent(p[i] || ''));
                }
                var url = "http://connect.qq.com/widget/shareqq/index.html?"+s.join('&');
                window.open(url);
            });
            $(".wechat").on("click",function(){
                $(this).socialShare("weixinShare",{
                    url:location.href,
                    content:'',
                    title:''
                });
            });
            $(".wechat-share").on("click",function(){
                $(this).socialShare("weixinShare",{
                    url:location.href,
                    content:'',
                    title:''
                });
            });
            $(".qZone").on("click",function(){
                $(this).socialShare("qZone",{
                    url:location.href,
                    content:'',
                    title:''
                });
            });
            $(".sinaWeibo").on("click",function(){
                var title = $('title').text();
                var   rLink = location.href;
                var backUrl = location.href;
                var site = $('title').text();
                var pic = "";
                window.open("http://service.weibo.com/share/share.php?pic=" +encodeURIComponent(pic) +"&title=" +
                    encodeURIComponent(title.replace(/ /g, " ").replace(/<br \/>/g, " "))+ "&url=" + encodeURIComponent(rLink),
                    "分享至新浪微博",
                    "height=500,width=600,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no");
            })
        }

    </script>
</block>